package com.hm.fleaMarket.controller;

import com.hm.fleaMarket.pojo.User;
import com.hm.fleaMarket.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: HM
 * @description:
 * @date: Created in 8:25 2018/2/25
 */
@RestController
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping(value = "api/index")
    public User index(){
        User user = userService.selectUserByUsername("test");
        return user;
    }


    @RequestMapping(value = "test")
    public void test(String name){

    }
}
